#!/bin/bash

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

FSM=
NSTATES=
NLTL=

while getopts ':a:n:f:u:' opt ; do
    case "$opt" in
        a) FSM="$OPTARG" ;;
        n) NSTATES="$OPTARG" ;;
        f) NLTL="$OPTARG" ;;
        [?]) echo >&2 "Usage: $0 -a (EFSM file) -n (number of EFSM states) -f (number of LTL formulae) -u (LTL priorities in the randltl format)" && exit 1 ;;
    esac
done

if [[ -z $FSM || -z $NSTATES || -z $NLTL ]] 
then
   echo >&2 "Usage: $0 -a (EFSM file) -n (number of EFSM states) -f (number of LTL formulae)" && exit 1
fi

cwd=$(pwd)

$SCRIPT_DIR/genltl -a $FSM -n 1 | sed 's/&&/and/g' | $SCRIPT_DIR/spin2egorov #| sed -r 's/^\((.+)\)$/\1/g'  
